function submitArticle() {
    var title = document.getElementById("add_title").value;
    var category = document.getElementById("add_category").value;
    var content = document.getElementById("add_content").innerText;
    var status = confirm("确认提交？");
    if (status) {
        $.ajax({
            url: 'http://localhost/Myblog/admin/control/addArticle.php',
            type: 'post',
            data: {
                'addTitle': title,
                'addCategory': category,
                'addContent': content
            },
            dataType: 'json',
            success: function (result) {
                if (result) {
                    alert("添加成功");
                    window.location.href = "index.html";
                }
            }
        })
    }
}